#ifndef PAGESWITCHBUTTON_H
#define PAGESWITCHBUTTON_H

#include <QPushButton>
#include <QWidget>
#include <QLabel>
class pageSwitchButton : public QPushButton
{
    Q_OBJECT
public:
    pageSwitchButton(QWidget *parent = nullptr);
    void setImageAndText(const QString& image_path,const QString& text,int page_id);
    void setImage(const QString& image_path);
    void setTextColor(const QString& color = "#000000");
    int getPageID()const;
protected:
    void mousePressEvent(QMouseEvent* event);
private:
    QLabel* image;
    QLabel* text;
    int page_id;
signals:
    void switchPage(int page_id);
};

#endif // PAGESWITCHBUTTON_H
